import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/login",
      component: () => import("@/pages/Login/index.vue"),
    },
   
    {
      path: "/",
      component: () => import("@/pages/Home/index.vue"),
      children: [
        {
          path: "users",
          component: () => import("@/pages/Users/index.vue"),
        },
        {
          path: "roles",
          component: () => import("@/pages/Roles/index.vue"),
        },
        {
          path: "rights",
          component: () => import("@/pages/Rights/index.vue"),
        },
        {
          path: "goods",
          component: () => import("@/pages/Goods/index.vue"),
        },
        {
          path: "params",
          component: () => import("@/pages/Params/index.vue"),
        },
        {
          path: "categories",
          component: () => import("@/pages/Categories/index.vue"),
        },
        {
          path: "orders",
          component: () => import("@/pages/Orders/index.vue"),
        },
        {
          path: "reports",
          component: () => import("@/pages/Reports/index.vue"),
        },
      ],
    },
    {
      path: "/:pathMatch(.*)*",
      component: () => import("@/pages/NotFound/index.vue"),
    },
  ],
});

export default router;
